import React from "react";
import ReactECharts from "echarts-for-react";

const BarGraph: React.FC = () => {
  const options = {
    title: {
      text: "各标段报验统计"
    },
    legend: {},
    grid: { left: 10, top: 60, right: 0, bottom: 0, containLabel: true },
    xAxis: {
      type: "category",
      data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
    },
    yAxis: {
      type: "value"
    },
    tooltip: {
      trigger: "axis",
      axisPointer: {
        type: "shadow"
      }
    },
    series: [
      {
        name: "报验中",
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: "bar"
      },
      {
        name: "未报验",
        data: [80, 900, 90, 34, 1000, 139, 320],
        type: "bar"
      }
    ],
    backgroundColor: "#ddd"
  };

  return <ReactECharts style={{ height: 400 }} option={options} />;
};
export default BarGraph;
